package com.hzit.controller;

import com.hzit.service.IBrandService;
import com.hzit.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hbxfwf
 * @since 2023-10-27
 */
@RestController
@RequestMapping("/brand")
public class BrandController {
	@Autowired
	private IBrandService brandService;

	//1. 查询品牌列表
	@GetMapping("/list")
	public R list(){
		return R.ok(brandService.list());
	}

	public static void main(String[] args) {
		BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
		String encode = encoder.encode("123456");
		System.out.println("encode = " + encode);
	}
}
